<%@ page language="java" errorPage="/error.jsp" pageEncoding="UTF-8" contentType="text/html;charset=UTF-8" %>
<%@ include file="/common/taglibs.jsp"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 
<html>
  <head>
    <base href="<%=basePath%>">
    <title>Admin</title>
    
    <%@ include file="/WEB-INF/layouts/meta.jsp" %>
    <link type="text/css" rel="stylesheet" href="common/css/content.css" />
    <style type="text/css">
    	#loading {
	        display:none; position: absolute; width: 100%; height: 100%; text-align: center;  padding: 300px 0 0 0; font: bold 12px Verdana,Arial,Helvetica,sans-serif; background-color: #ffffff; color: #336699; z-index: 9999;
	    }
    	#saveOrderBtn { cursor: pointer; margin-right: 18px; right: 10px; top:0px; position: absolute; width:16px; height:16px; }
    	
    	#tabs li .ui-icon-close { float: left; margin: 0.4em 0.2em 0 0; cursor: pointer; }
		#add_tab { cursor: pointer; }
    	
    	.ztree li span.button.pIcon01_ico_open{margin-right:2px; background: url(script/jQuery1.7.2/ztree/css/img/diy/1_open.png) no-repeat scroll 0 0 transparent; vertical-align:top; *vertical-align:middle}
		.ztree li span.button.pIcon01_ico_close{margin-right:2px; background: url(script/jQuery1.7.2/ztree/css/img/diy/1_close.png) no-repeat scroll 0 0 transparent; vertical-align:top; *vertical-align:middle}
		.ztree li span.button.pIcon02_ico_open, .ztree li span.button.pIcon02_ico_close{margin-right:2px; background: url(script/jQuery1.7.2/ztree/css/img/diy/2.png) no-repeat scroll 0 0 transparent; vertical-align:top; *vertical-align:middle}
		.ztree li span.button.icon01_ico_docu{margin-right:2px; background: url(script/jQuery1.7.2/ztree/css/img/diy/3.png) no-repeat scroll 0 0 transparent; vertical-align:top; *vertical-align:middle}
		.ztree li span.button.icon02_ico_docu{margin-right:2px; background: url(script/jQuery1.7.2/ztree/css/img/diy/4.png) no-repeat scroll 0 0 transparent; vertical-align:top; *vertical-align:middle}
		.ztree li span.button.icon03_ico_docu{margin-right:2px; background: url(script/jQuery1.7.2/ztree/css/img/diy/5.png) no-repeat scroll 0 0 transparent; vertical-align:top; *vertical-align:middle}
		.ztree li span.button.icon04_ico_docu{margin-right:2px; background: url(script/jQuery1.7.2/ztree/css/img/diy/6.png) no-repeat scroll 0 0 transparent; vertical-align:top; *vertical-align:middle}
		.ztree li span.button.icon05_ico_docu{margin-right:2px; background: url(script/jQuery1.7.2/ztree/css/img/diy/7.png) no-repeat scroll 0 0 transparent; vertical-align:top; *vertical-align:middle}
		.ztree li span.button.icon06_ico_docu{margin-right:2px; background: url(script/jQuery1.7.2/ztree/css/img/diy/8.png) no-repeat scroll 0 0 transparent; vertical-align:top; *vertical-align:middle}
    	
    </style>
    
	<lrsux:Resource name="lrsux" />
	<script type="text/javascript" src="script/utils/json2.js"></script>
	<script type="text/javascript" src="script/ztree.js"></script>
    <script>
		var outerLayout, gridPerm;
		var layoutSettings = {
	            name: "outerLayout" 
	    ,       defaults: {
	                    size:                                   "auto"
	//            ,       minSize:                                80
	            ,       paneClass:                              "pane"          // default = 'ui-layout-pane'
	            ,       resizerClass:                   "resizer"       // default = 'ui-layout-resizer'
	            ,       togglerClass:                   "toggler"       // default = 'ui-layout-toggler'
	            ,       buttonClass:                    "button"        // default = 'ui-layout-button'
	            ,       contentSelector:                ".content"      // inner div to auto-size so only it scrolls, not the entire pane!
	            ,       contentIgnoreSelector:  "span"          // 'paneSelector' for content to 'ignore' when measuring room for content
	            ,       togglerLength_open:             35                      // WIDTH of toggler on north/south edges - HEIGHT on east/west edges
	            ,       togglerLength_closed:   35                      // "100%" OR -1 = full height
	            ,       hideTogglerOnSlide:             true            // hide the toggler when pane is 'slid open'
	            ,       togglerTip_open:                "Close This Pane"
	            ,       togglerTip_closed:              "Open This Pane"
	            ,       resizerTip:                             "Resize This Pane"
	            ,       fxName:                                 "slide"         // none, slide, drop, scale
	            ,       fxSpeed_open:                   750
	            ,       fxSpeed_close:                  1500
	            ,       fxSettings_open:                { easing: "easeInQuint" }
	            ,       fxSettings_close:               { easing: "easeOutQuint" }
	    }
	    ,       north: {
	    	 			size:                              91
	            ,        spacing_open:                   0                       // cosmetic spacing
	            ,       togglerLength_open:             0                       // HIDE the toggler button
	            ,       togglerLength_closed:   -1                      // "100%" OR -1 = full width of pane
	//            ,		spacing_closed: 0								//either (togglerLength_closed & spacing_closed) eq 0 is hide the toggler button
	//            ,       slidable:                               false
	            //      override default effect
	            ,       fxName:                                 "none"
	            }
	    ,       south: {
	//                    size:                                41
	//            ,       spacing_closed:                 10                       // HIDE resizer & toggler when 'closed'
	//            ,       slidable:                               true           // REFERENCE - cannot slide if spacing_closed = 0
	                   resizable:                               false
	            ,       togglerLength_open:             -1                       
	            ,       togglerLength_closed:   		-1                      // "100%" OR -1 = full width of pane
	            ,       fxName:                                 "none"
	            ,		onclose: function() {	
	            			//jQuery("#jqGrid").jqGrid("setGridHeight", calcGridHeight());
	            		}
				,		onopen: function() {	
							//jQuery("#jqGrid").jqGrid("setGridHeight", calcGridHeight());
						}
	            
	            }
	    ,       west: {
	                    size:                                 180
	            ,       spacing_closed:                 8                      // wider space when closed
	            ,       togglerAlign_closed:    "center"           // align to center of resizer
	            ,       togglerLength_closed:   48                      // make toggler 'square' - 21x21
	            ,       togglerLength_open:             48                       // toggler button size when status is opened
	            ,       togglerTip_open:                "Close West Pane"
	            ,       togglerTip_closed:              "Open West Pane"
	            ,       resizerTip_open:                "Resize West Pane"
	            ,       slideTrigger_open:              "click"         // default
	            ,       initClosed:                             false
	            //      add 'bounce' option to default 'slide' effect
	            ,       fxSettings_open:                { easing: "easeOutBounce" }
				,		onresize:                 function () { 
							//jQuery("#accordions").accordion("resize"); 
						}
				,		onclose: function() {	
						}
				,		onopen: function() {
					}
	
	            }
	    ,       east: {
	                    size:                                   90
				,		maxSize:								150
	            ,       spacing_closed:                 6                      // wider space when closed
	            ,       togglerLength_closed:   48                      // make toggler 'square' - 21x21
	            ,       togglerAlign_closed:    "center"          
	            ,       togglerLength_open:             48                       
	            ,       slideTrigger_open:              "mouseover"
	            ,       initClosed:                             false
	            //      override default effect, speed, and settings
	            ,       fxName:                                 "drop"
	            ,       fxSpeed:                                "normal"
	            ,       fxSettings:                             { easing: "" } // nullify default easing
	            }
	    ,       center: {
	                    paneSelector:                   "#mainContent"                  // sample: use an ID to select pane instead of a class
	            }
	    };
		
		//init layout
		jQuery(function($) {
			
		    // create the OUTER LAYOUT
	        outerLayout = $("body").layout(layoutSettings);
	
	        // save selector strings to vars so we don't have to repeat it
	        // must prefix paneClass with "body > " to target ONLY the outerLayout panes
	        var westSelector = "body > .ui-layout-west"; // outer-west pane
	        //var eastSelector = "body > .ui-layout-east"; // outer-east pane
	
	         // CREATE SPANs for pin-buttons - using a generic class as identifiers
	        $("<span></span>").addClass("pin-button").prependTo( westSelector );
	        //$("<span></span>").addClass("pin-button").prependTo( eastSelector );
	        // BIND events to pin-buttons to make them functional
	        outerLayout.addPinBtn( westSelector +" .pin-button", "west");
	       // outerLayout.addPinBtn( eastSelector +" .pin-button", "east" );
	
	         // CREATE SPANs for close-buttons - using unique IDs as identifiers
	        $("<span></span>").attr("id", "west-closer" ).prependTo( westSelector );
	        //$("<span></span>").attr("id", "east-closer").prependTo( eastSelector );
	        // BIND layout events to close-buttons to make them functional
	        outerLayout.addCloseBtn("#west-closer", "west");
	        //outerLayout.addCloseBtn("#east-closer", "east");
	
			$("#eMenuBar").hover(function() {
				outerLayout.allowOverflow(this);
			}, function() {
				outerLayout.resetOverflow(this);
			});
		});

		function sendAjaxReq(data, callback) {

			jQuery.ajax({
				type:"POST",
				data:data,
				url: "json/data-load!loadZTree.action",
				dataType: 'json',
				contentType: "application/json",
				success: callback
			});
		}

		
    </script>
  </head>

<body>

	<div id="loading">Loading content, please wait..  <img src="common/images/loading.gif" alt="loading.." /></div>
	
	<div class="ui-layout-west" style="overflow:hidden;">
        <div class="header ui-widget-header">
        	Navigation
        	<span id="saveOrderBtn" class="ui-icon ui-icon-disk" title="Save Item Order"></span>
        </div>
        <div class="content">
       		<label>ZTree Test</label>
			<div class="zTreeDemoBackground left">
				<ul id="treeDemo" class="ztree"></ul>
			</div>
        </div>
	</div>
	
	<div  class="ui-layout-east">
       <div class="header ui-widget-header">Actions</div>
	    <div class="contents">
       </div>
	</div>

	<div class="ui-layout-north" style="overflow: hidden;">
        <div>
		</div>
	</div>

	<div class="ui-layout-south">
        <div>
        </div>
	</div>

	<div id="mainContent" style="overflow: hidden;">
		
		<div class="main-item" id="p4">
			<div class="item-content">
		       	<div id="tabs">
					<ul>
						<li><a href="#tabs-1">Nunc tincidunt</a></li>
						<li><a href="#tabs-2">Proin dolor</a></li>
						<li><a href="#tabs-3">Aenean lacinia</a></li>
					</ul>
					<div id="tabs-1">
						<p>Proin elit arcu, rutrum commodo, vehicula tempus, commodo a, risus. Curabitur nec arcu. Donec sollicitudin mi sit amet mauris. Nam elementum quam ullamcorper ante. Etiam aliquet massa et lorem. Mauris dapibus lacus auctor risus. Aenean tempor ullamcorper leo. Vivamus sed magna quis ligula eleifend adipiscing. Duis orci. Aliquam sodales tortor vitae ipsum. Aliquam nulla. Duis aliquam molestie erat. Ut et mauris vel pede varius sollicitudin. Sed ut dolor nec orci tincidunt interdum. Phasellus ipsum. Nunc tristique tempus lectus.</p>
					</div>
					<div id="tabs-2">
						<p>Morbi tincidunt, dui sit amet facilisis feugiat, odio metus gravida ante, ut pharetra massa metus id nunc. Duis scelerisque molestie turpis. Sed fringilla, massa eget luctus malesuada, metus eros molestie lectus, ut tempus eros massa ut dolor. Aenean aliquet fringilla sem. Suspendisse sed ligula in ligula suscipit aliquam. Praesent in eros vestibulum mi adipiscing adipiscing. Morbi facilisis. Curabitur ornare consequat nunc. Aenean vel metus. Ut posuere viverra nulla. Aliquam erat volutpat. Pellentesque convallis. Maecenas feugiat, tellus pellentesque pretium posuere, felis lorem euismod felis, eu ornare leo nisi vel felis. Mauris consectetur tortor et purus.</p>
					</div>
					<div id="tabs-3">
						<p>Mauris eleifend est et turpis. Duis id erat. Suspendisse potenti. Aliquam vulputate, pede vel vehicula accumsan, mi neque rutrum erat, eu congue orci lorem eget lorem. Vestibulum non ante. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Fusce sodales. Quisque eu urna vel enim commodo pellentesque. Praesent eu risus hendrerit ligula tempus pretium. Curabitur lorem enim, pretium nec, feugiat nec, luctus a, lacus.</p>
						<p>Duis cursus. Maecenas ligula eros, blandit nec, pharetra at, semper at, magna. Nullam ac lacus. Nulla facilisi. Praesent viverra justo vitae neque. Praesent blandit adipiscing velit. Suspendisse potenti. Donec mattis, pede vel pharetra blandit, magna ligula faucibus eros, id euismod lacus dolor eget odio. Nam scelerisque. Donec non libero sed nulla mattis commodo. Ut sagittis. Donec nisi lectus, feugiat porttitor, tempor ac, tempor vitae, pede. Aenean vehicula velit eu tellus interdum rutrum. Maecenas commodo. Pellentesque nec elit. Fusce in lacus. Vivamus a libero vitae lectus hendrerit hendrerit.</p>
					</div>
				</div>
			</div>
		</div>
	</div>

</body>
</html>

